{extends 'base/site2.html'}
{block name="page_header"}{include file="common/header.html" inline}{/block}
{block name="page_nav"}{include file="common/slide-nav.html" inline}{/block}
{block name="page_styles"}
<link rel="stylesheet" type="text/css" href="/css/mediation/assets/index.css" />
{/block}
{block name="page_scripts"}
<script type="text/javascript" src="/js/mediation/del/del.min.js" init="mediation/del/del"></script>
{/block}
{block name="page_section"}
    <div class="sessionPage bg-fff">
        <div class="page-header">
          <div class="left">
            <span class="line"></span>
            <strong class="tit">资产方管理</strong>
          </div>
          <div class="right">
            <a href="/assets/add">
              <button type="button" class="btn btn-info textright" style="float: right;margin-right: 20px;">新增</button>
            </a>
          </div>
        </div>
        <div style="width: 95%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        overflow-x: scroll;">
            <table class="table table-bordered table-striped table-hover  text-nowrap">
                <thead>
                    <tr>
                        <th scope="col">ID</th>
                        <th scope="col">资产方名称</th>
                        <th scope="col">接入类型</th>
                        <th scope="col">线路1外显号</th>
                        <th scope="col">线路2外显号</th>
                        <th scope="col">短信签名</th>
                        <th scope="col">短信中心名称</th>
<!--                        <th scope="col">appId</th>
                        <th scope="col">publicKey</th>-->
                        <th scope="col">备注</th>
                        <th scope="col">添加时间</th>
                        <th scope="col" class="fix-ele">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {if $list}
                        {foreach from=$list key=key item=item}
                            <tr>
                                <td>{$item['id']}</td>
                                <td>{$item['name']}</td>
                                <td>{if !empty($accessType[$item['accessType']])}{$accessType[$item['accessType']]}{/if}</td>
                                <td>{if $item['outNumber']} {$item['outNumber']}-{$numCard[$item['outNumber']]}{else}--{/if}</td>
                                <td>{if $item['outNumber2']} {$item['outNumber2']}-{$numCard[$item['outNumber2']]}{else}--{/if}</td>
                                <td>{if $item['smsSign']}{$smsSign[$item['smsSign']]}{else}--{/if}</td>
                                <td>{if $item['smsCenterName']}{$centerName[$item['smsCenterName']]}{else}--{/if}</td>
<!--                                <td>{if $item['appid']} {$item['appid']}{else}&#45;&#45;{/if}</td>-->
<!--                                <td>{if $item['publicKey']}{$item['publicKey']} {else}&#45;&#45;{/if}</td>-->
                                <td>{$item['desc']}</td>
                                <td>{$item['addTime']|date_format:"%Y-%m-%d %H:%M:%S"}</td>
                                <td class="fix-ele">

                                    <a href="/assets/edit?id={$item['id']}">编辑</a>
                                    <a href="javascript:;" data-toggle="modal" data-target=".delmodal" data-id="{$item['id']}" role-click="modalshow">
                                       删除
                                    </a>
                                </td>
                            </tr>
                        {/foreach}
                    {/if}
                </tbody>
            </table>
        </div>
        <div class="clearfix pad-no text-nowrap" style="margin-top: 20px;">
            {include file="base/pagenav.html"  action="/assets/index" pagenum=$curPageNum inline}
            <span style="float:right;margin-right: 10px">共 {$totalnum} 条</span>
        </div>
        <div class="modal fade delmodal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
            <div class="modal-dialog modal-sm" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">确认删除这条数据？</h4>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-danger" role-click="del" data-url="/assets/del" data-id="">删除</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
{/block}
